<?php
$html = '<ul>';
foreach($categories as $category) {
	$html .= '<li>';
	$html .= CHtml::link(CHtml::image(Yii::app()->baseUrl.$category->image),array('fashion/products','id'=>$category->id,'category'=>urlencode(str_replace(' ','_',$category->name))));
	$html .= '</li>';
}
$html .= '</ul>';
?>

<div id="main">
<?php if($type->id == 1) { ?>
	<div class="product-man">
		<?php echo $html; ?>
	</div>
<?php } else if($type->id == 2) { ?>
	<div class="product-woman">
		<?php echo $html; ?>
	</div>
<?php } else { ?>
	<div class="product-service">
		<div class="product-service-image">
			<?php echo CHtml::image(Yii::app()->baseUrl.'/images/logo.png'); ?>
		</div>
    	<div class="product-content">
            <?php echo $html; ?>
    	</div>
	</div>
<?php } ?>
</div>